package dk.hewison.client.panels;

import com.google.gwt.user.client.ui.ClickListener;
import com.google.gwt.user.client.ui.PopupPanel;
import com.google.gwt.user.client.ui.Widget;
import dk.hewison.client.component.MyImage;

/**
 * @author John Hewison
 * @author $LastChangedBy: john.hewison $:  $ $LastChangedDate: 2009-02-01 11:50:01 +0000 (Sun, 01 Feb 2009) $:
 * @version $Revision: 77 $:
 */
public class ImageQuickView extends PopupPanel {

    MyImage myImage;

    public ImageQuickView() {
        super(true);
        setAnimationEnabled(true);
    }

    public MyImage getMyImage() {
        return myImage;
    }

    public void setMyImage(MyImage myImage) {
        this.myImage = myImage;
        setWidget(myImage);

        myImage.addClickListener(new ClickListener() {
            public void onClick(Widget sender) {
                hide();
            }
        });
    }
}
